{% extends "base.html" %}
{% load wagtailcore_tags wagtailimages_tags %}

{% block body_class %}template-blogpage{% endblock %}


{% block content %}
{{ page.increase_views }}
<!-- 阅读量+1 直接刷新也会加 -->
<div class="baseLayout bgf">
	<div class="productGrid">
		<!-- detailGrid -->
		<div class="detailGrid page">
			<div class="pageDetailGroup">
				<div class="headWrap">
					<h1 class="articleTitle">{{ page.title }}</h1>
					<div class="">
						<div class="headInfo">
							<span>{{ page.get_parent.title }}</span>
							<span class="ml5 mr5">·</span>
							<span>{{ page.date }}</span>
							<span class="ml5 mr5">·</span>
							<span> {{ page.total_views }} 次浏览</span>
							<span class="ml5 mr5">·</span>
							<span>文 / 作者</span>
							<span class="ml5 mr5">·</span>
							<span>原创</span>
						</div>
					</div>
					<div>
						<span>标签：</span>
						{% for tag in page.tags.all %}
						<span class="ml5 mr5">
							<a href="{% slugurl 'tags' %}?tag={{ tag }}" class="tag">	
							<!--此处{% slugurl 'tags' %}对应BlogTagIndexPage对面的缩略名-->
								<button type="button" >{{ tag }}</button>
							</a>
						</span>
						{% endfor %}
					</div>
				</div>
				

				<div>
					{% image page.cover width-900 class="articleThumb" %}
				</div>

				<div class="articleWrapper">
					{{ page.body|richtext }}
				</div>

				<i>上一篇：{$pre}<br><br></i>
				<i>下一篇：{$next}</i>
				<p><a href="{{ page.get_parent.url }}">Return to blog</a></p>
			</div>

			<!-- zanGroup -->
			<div id="yzmcms_digg_div" class="zanGroup">
				<div class="zanBtn" onclick="digg('https://chappie.duoguyu.com/index/digg/init.html', 1, 81, 1)">
					<i class="iconfont icon-dianzan1"></i>
				</div>
				<p><span id="up" class="numFont2">5</span></p>
			</div>
			<!-- / zanGroup -->

			<!-- 标签 -->
			<div class="tagGroup star">
				<div class="tagBox">
					<a class="favoriteBtn" href="javascript:;" onclick="add_favorite('{$title}');" id="favorite">收藏</a>
				</div>
			</div>

			<!-- 评论区 开始 -->
			<div class="commonHeadLabel small">
				<div class="title">评论列表</div>
			</div>
			<div class="commentGrid">
				<div class="commentForm">
					<form action="https://chappie.duoguyu.com/comment/index/init.html" method="post"
						onsubmit="return check_comm(this)">
						<input type="hidden" name="modelid" value="1">
						<input type="hidden" name="catid" value="15">
						<input type="hidden" name="id" value="81">
						<input type="hidden" name="title" value="锤子科技鸟巢发布革命性产品坚果 TNT 工作站和旗舰坚果 R1">
						<input type="hidden" name="url" value="https://chappie.duoguyu.com/industry/81.html">
						<textarea class="commentTextarea" id="content" name="content" placeholder="我来说两句~"></textarea>
						<div class="btnBox"><input type="submit" class="submitBtn" name="dosubmit" value="提交"></div>
					</form>
				</div>

				<!-- 评论列表 -->
				<div class="commentList">
					<div class="title">共0条评论</div>
					<div class="commentGrid">
						<ul class="itemUl">
							<li class="tips">这篇文章还没有收到评论，赶紧来抢沙发吧~</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

{% endblock %}




<!--
<h1>{{ page.title }}</h1>
    </br>
    <p class="meta">{{ page.date }}</p>
    </br>
    {% with categories=page.categories.all %}
        {% if categories %}
            <h3>Posted in:</h3>
            <ul>
                {% for category in categories %}
                    <li style="display: inline">
                        {% image category.icon fill-32x32 style="vertical-align: middle" %}
                        {{ category.name }}
                    </li>
                {% endfor %}
            </ul>
        {% endif %}
    {% endwith %}
    </br>
    <div class="intro">{{ page.intro }}</div>
    </br>
    {% if page.tags.all.count %}
        <div class="tags">
            <h3>标签</h3></br>
            {% for tag in page.tags.all %}
                <a href="{% slugurl 'tags' %}?tag={{ tag }}"><button type="button">{{ tag }}</button></a>
            {% endfor %}
        </div>
    {% endif %}
    </br>
    {{ page.body|richtext }}

    {% for item in page.gallery_images.all %}
        <div style="float: left; margin: 10px">
            {% image item.image fill-320x240 %}
            <p>{{ item.caption }}</p>
        </div>
    {% endfor %}

    <p><a href="{{ page.get_parent.url }}">Return to blog</a></p>

-->